<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>移动端的分页功能</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    html, body {
      width: 100%;
      height: 100%;
      /* overflow: hidden; */
    }
      .box {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
      }
      .box p {
          height: 40px;
          line-height: 40px;
          text-align: center;
      }
      .box .container {
        flex-grow: 1;
      }
      .box .container ul {

      }
       .box .container ul li {
         height: 40px;
         line-height: 40px;
        border-top: 1px solid #ccc;
        border-bottom: 1px solid #ccc;
        text-align: center;
       }
  </style>
</head>
<body>
  <div class="box">
    <p>下面是分页功能测试</p>
    <div class="container">
    <ul>
      <li>1</li>
      <li>2</li>
      <li>3</li>
      <li>4</li>
      <li>5</li>
      <li>6</li>
      <li>7</li>
      <li>8</li>
      <li>9</li>
      <li>10</li>
      <li>11</li>
      <li>12</li>
      <li>13</li>
      <li>14</li>
      <li>15</li>
      <li>16</li>
      <li>17</li>
      <li>18</li>
      <li>19</li>
      <li>20</li>
      <li>21</li>
      <li>22</li>
    </ul>
    </div>
  </div>  
<script src="./jquery.js"></script>
<script src="./pagging.js"></script>
<script>
  var obj = { 
    template: '<p>你好</p>',   //要渲染的页面结构
    el: '.container ul',    //页面荣区，盛放要被渲染的几条狗
    refreshLength: 50, //距离底部多高刷新页面
  }
  new Pagging(obj);
</script>
</body>
</html>